package com.newdjk.newdoctor.db.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.newdjk.newdoctor.entity.LoginData;
import com.newdjk.newdoctor.entity.PushDataDaoEntity;

import com.newdjk.newdoctor.db.gen.LoginDataDao;
import com.newdjk.newdoctor.db.gen.PushDataDaoEntityDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig loginDataDaoConfig;
    private final DaoConfig pushDataDaoEntityDaoConfig;

    private final LoginDataDao loginDataDao;
    private final PushDataDaoEntityDao pushDataDaoEntityDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        loginDataDaoConfig = daoConfigMap.get(LoginDataDao.class).clone();
        loginDataDaoConfig.initIdentityScope(type);

        pushDataDaoEntityDaoConfig = daoConfigMap.get(PushDataDaoEntityDao.class).clone();
        pushDataDaoEntityDaoConfig.initIdentityScope(type);

        loginDataDao = new LoginDataDao(loginDataDaoConfig, this);
        pushDataDaoEntityDao = new PushDataDaoEntityDao(pushDataDaoEntityDaoConfig, this);

        registerDao(LoginData.class, loginDataDao);
        registerDao(PushDataDaoEntity.class, pushDataDaoEntityDao);
    }
    
    public void clear() {
        loginDataDaoConfig.clearIdentityScope();
        pushDataDaoEntityDaoConfig.clearIdentityScope();
    }

    public LoginDataDao getLoginDataDao() {
        return loginDataDao;
    }

    public PushDataDaoEntityDao getPushDataDaoEntityDao() {
        return pushDataDaoEntityDao;
    }

}
